<template>
	<view>
		<view class="news_det">
			<h4>{{jsonData.title}}</h4>
			<view class="news_bottom" v-html="jsonData.content">

			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id: 0,
				jsonData: [],
			}
		},
		onLoad(options) {
			this.id = options.id;
			this.getIndex();
		},
		methods: {
			getIndex() {
				uni.$u.http.post("/news/details", {
					id: this.id
				}).then((res) => {
					if (res.code == 200) {
						this.jsonData = res.data;
					}
				})
			},

		}
	}
</script>

<style lang="scss">
	.news_det {
		padding: 60rpx;
	}

	h4 {
		line-height: 48rpx;
		font-weight: bold;
	}

	.news_top {
		margin-top: 120rpx;
		background: #fff2e2;
		text-align: justify;
		border-bottom: 4rpx solid #d12a00;
		font-size: 24rpx;
		padding: 32rpx;
		line-height: 48rpx;
	}

	.news_bottom {
		.one {
			display: block;
			width: 100%;
			margin: 50rpx 0 40rpx;
			height: 400rpx;
		}

		span {
			display: flex;
			flex-wrap: wrap;
			justify-content: center;
			font-size: 24rpx;
			color: #999;
		}

		p {
			text-align: justify;
			border: 2rpx solid #d12a00;
			font-size: 24rpx;
			padding: 16rpx 32rpx;
			line-height: 48rpx;
			margin: 20rpx 0;
		}
	}
</style>